package com.reading.common.utils.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author guwenqi_1995@163.com
 * @date 2019/7/10 10:40 AM
 **/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER, ElementType.FIELD})
@Constraint(validatedBy = ValidatorImpl.class)
public @interface Validator {

    //flag的有效值多个使用','隔开
    String values();
    //提示内容
    String message() default "error 不存在";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
